/*----------------------------------------------
 *       hfile:      Vge_UserManager.h       
 *       Created Date:  11/22/2001             
 *       Developer:  Stephen.Yao              
 *       Studio:     Zhuq Studio       
 *----------------------------------------------
 */
#ifndef CCGISUSERMANAGER__H__INTERFACE
#define CCGISUSERMANAGER__H__INTERFACE
#include "Vge_MStruct.h"
#include "Vge_ccgisDataBase.h"

namespace ccgis{

class AFX_EXT_CLASS CcgisUserManager  
{
public:
	int usrGetMaxID();
	int usrGetRecCnt();
	int usrGetAbsRecCnt();
	STATUS usrGetAUsrInfo( char UsrName[MAX_NAME],CcgisUserInfo &usrInfo );
	STATUS usrGetAUsrInfo( int UsrId,CcgisUserInfo &usrInfo );
	STATUS usrUpdateAUsr( CcgisUserInfo usrInfo );
	STATUS usrSubUser( int UsrId );
	STATUS usrSubUser( char UsrName[MAX_NAME] );
	//---------------------------------------------------------------------------//
	STATUS usrAddUser( char UsrName[MAX_NAME] );
	//---------------------------------------------------------------------------//
	STATUS usrCreateUser( char UserName[MAX_NAME],char PassWord[MAX_NAME],BOOL bLocked );
	//---------------------------------------------------------------------------//
	STATUS usrDeleteUser( char UserName[MAX_NAME] );
	//---------------------------------------------------------------------------//
	STATUS usrChangPassWord( char UserName[MAX_NAME],char oldPassWord[MAX_NAME],char newPassWord[MAX_NAME] );
	//---------------------------------------------------------------------------//
	STATUS usrLockUser( char UserName[MAX_NAME] );
	//---------------------------------------------------------------------------//
	STATUS usrUnlockUser( char UserName[MAX_NAME] );
	//---------------------------------------------------------------------------//
	STATUS usrGetAllUserInfo( CcgisUserInfo *&usrs,int &len );
	//---------------------------------------------------------------------------//
private:
	STATUS usrCreateSynonym( char usrName[MAX_NAME] );
	STATUS usrDeleteSynonym(char usrName[MAX_NAME]);
	STATUS usrGetUsrPSInfo( char UsrName[MAX_NAME],char PassWord[MAX_NAME],char Status[MAX_NAME] );
};

}

#endif
